ChatFrame1:AddMessage("\124cFF1987FFHex\124cFFFFFFFFUI Loaded.")

-------------------------------------------------------
-- Local variables
-------------------------------------------------------
local hU = "|cffe1a500Hex|cff69ccf0UI|cffffffff" -- HexUI in color
local curVer = "|cffe1a500Version |cffffffff0.1" -- Version

-------------------------------------------------------
-- Default Config
-------------------------------------------------------
local HUIconfig_enabled = true;		-- addon enabled?
local HUIconfig_autorepair = false; 	-- autorepair?
local HUIconfig_autosell = false; 	-- autosell?
local HUIconfig_autorelease = false;	-- autorelease?
local huo = HexUI_options

InterfaceOptions_AddCategory(huo)


-------------------------------------------------------
-- Themeing
-------------------------------------------------------
-- BasicMiniMap
CreateBorder(Minimap, 12, 1, 1, 1, 1)

-- Chat Window
CreateBorder(ChatFrame, 12, 1, 1, 1, 1)

-- Raid Markers
CreateBorder(HexUI_iconFrame, 12, 1, 1, 1, 1)
CreateBorder(HexUI_controlFrame, 12, 1, 1, 1, 1)
CreateBorder(HexUI_mainFrame, 12, 1, 1, 1, 1)

-------------------------------------------------------
-- Options Panel (and sub frames)
-------------------------------------------------------
SLASH_HEXUI1 = '/hexui'
SLASH_HEXUI2 = '/hu'

function SlashCmdList.WMARK(msg, editbox)
	if (msg=="lock") then
		HexUI_lockToggle()
		wFlares_lockToggle()
	elseif (msg=="reset") then
		HexUI_reset()
	elseif (msg=="show") then
		HexUI_show()
	elseif (msg=="hide") then
		HexUI_hide()
	elseif (msg=="clamp") then
		HexUI_clamp()
	elseif (msg=="options") then
		InterfaceOptionsFrame_OpenToCategory(HexUI.options)
	else
		InterfaceOptionsFrame_OpenToCategory(HexUI.options)
	end
end

local b = "|cffffd200"
local cbt = "UICheckButtonTemplate"

if not InterfaceOptionsFrame:IsMovable() then InterfaceOptionsFrame:SetMovable(true); InterfaceOptionsFrame:SetScript("OnMouseDown", function(self) self:StartMoving() end); InterfaceOptionsFrame:SetScript("OnMouseUp", function(self) self:StopMovingOrSizing() end) end
local header = hmo:CreateFontString(nil, "OVERLAY", "GameFontNormalLarge")
header:SetPoint("TOPLEFT", hmo, 20,-20)
header:SetText(hU)
local version = hmo:CreateFontString(nil, "OVERLAY", "ChatFontSmall")
version:SetPoint("TOPLEFT", hmo,30,-50)
version:SetText(b.."Version:|r "..GetAddOnMetadata("HexUI", "Version"))
local desc = hmo:CreateFontString(nil, "OVERLAY", "ChatFontSmall")
desc:SetPoint("TOPLEFT", version,0,-20)
desc:SetText(b.."About:|r "..GetAddOnMetadata("HexUI", "Notes"))
local author = hmo:CreateFontString(nil, "OVERLAY", "ChatFontSmall")
author:SetPoint("TOPLEFT", desc,0,-20)
author:SetText(b.."Author:|r Vito - Bafangu")
